import { IsEmail, IsNotEmpty, IsString, MinLength, MaxLength, Length, IsNumberString, IsEnum } from 'class-validator';

export class SendCodeDto {
  @IsEmail({}, { message: '请输入正确的邮箱格式' })
  @IsNotEmpty({ message: '邮箱不能为空' })
  email: string;

  @IsString()
  @IsNotEmpty({ message: '类型不能为空' })
  @IsEnum(['register', 'forgot', 'switch_email'], { message: '类型必须为 register、forgot或switch_email' })
  type: string;
}